#if !defined(AFX_LISTCTRLEX_H__699D1744_04BA_48D6_9625_0D8D42915A5F__INCLUDED_)
#define AFX_LISTCTRLEX_H__699D1744_04BA_48D6_9625_0D8D42915A5F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ListCtrlEx.h : header file
//

#pragma warning(disable:4786)

#include <map>

using namespace std;

/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx window

class CListCtrlEx : public CListCtrl
{
// Construction
public:
	CListCtrlEx();

public:
	
	enum lcmask {  LCMASK_STRING	= 0x0040,
                   LCMASK_INTEGER	= 0x0080,
                   LCMASK_FLOAT		= 0x0100,
                   LCMASK_PERCENT	= 0x0200 };

private:
	BOOL m_bAscending;
	int m_nSortCol;
	map<int,int> m_ColType;

	int Compare(LPCTSTR, LPCTSTR, UINT nMask = LCMASK_STRING);

// Operations
public:
	int InsertColumn(int nCol, LPCTSTR lpszColumnHeading, int nFormat = LVCFMT_LEFT, UINT nMask = LCMASK_STRING, int nWidth = -1, int nSubItem = -1);
	int SortInColumn(int, BOOL = TRUE, int low = 0, int high = -1);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CListCtrlEx)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CListCtrlEx();

	// Generated message map functions
protected:
	//{{AFX_MSG(CListCtrlEx)
	afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LISTCTRLEX_H__699D1744_04BA_48D6_9625_0D8D42915A5F__INCLUDED_)
